#ifndef prs_FrmParaEdit_H
#define prs_FrmParaEdit_H

#include "prs_FrmFunc.h"
#include "prs_FrmRules.h"
#include "prs_FrmGeom.h"
#include "prs_FrmControl.h"
#include "prs_FrmParaEditStyle.h"
#include "frm_control_TParaEdit.h"

namespace prs {

///////////////////////////////////////////////////////////////////////////////

struct TNodeFrmParaEdit : public TNodeFrmControl
{
  DECLARE_ClientNode()
  //
  typedef TNodeFrmParaEditStyle   TStyle;
  typedef frm::control::TParaEdit TControl;
  //
  TAttrNodeType<nodeType_ParaEdit> NodeType;
  TAttrPointerNoCopy<attrName_Control,frm::control::TParaEdit*> Control;
  //
  TNodeFrmParaEdit() : NodeType(this),Control(this) {}
 ~TNodeFrmParaEdit() { delete Control.GetValue();}
  //
  frm::control::TParaEdit *BuildControl(
    frm::control::TPanel *ParentControl
  );
};
                   
///////////////////////////////////////////////////////////////////////////////

struct TRuleFrmParaEdit : public snt::TRule
{
  TRuleFrmParaEdit(
    snt::text::TContext &Context,
    svl::TVariant &VParentNode,
    TRuleFrmChildrenBase &RChildren,
    TRuleSetNodeIdOptionally &RSetNodeIdOptionally,
    TRuleFrmGeom &RFrmGeom,
    TRuleSetStyle &RStyle
  );

private:  
  TNodeFrmParaEdit *GetNode() { return dynamic_cast<TNodeFrmParaEdit*>(vParentNode.Pointer());}
  //
  void FSetGeometry(snt::TParams &Params) { rGeometry.SetGeom( &GetNode()->Geometry.Value );}
  //
  svl::TVariant &vParentNode;
  TRuleFrmGeom &rGeometry;
  snt::TRule  RAttr,RAttr1;
  snt::TAlter AAttr1;
  svl_Except;
};

///////////////////////////////////////////////////////////////////////////////
}

#endif
